<?

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Talker</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" charset="utf-8">
 $(function(){
 	$("#invia").click(function(){	
 		
 		
	 		$("#loading").html("Pensando...");	 		
	 		var testo = $("#contenuto").html();
	 		var req = $("#req").attr("value");	 		
	 		testo += "<br/><font class='my'>" + req + "</font>" ;
	 		$("#contenuto").html(testo);
	 		
	 		$.getJSON("Talker.php?",{req: $("#req").attr("value"), apprendi: $("#apprendi").attr("checked")}, function(j){
	 			var testo = $("#contenuto").html();
	 			for (var i = 0; i < j.length; i++) {
	 				testo += "<br/><font class='talker'>" + j[i].testo + "</font>" ;
	 			}
	 			$("#contenuto").html(testo);
	 			$("#loading").html("pronto");
	 		})
			
 		
 	})
 })
</script>
<style type="text/css">
<!--
#container {
	margin: auto;
	width: 600px;
}
body {
	font: 12px Verdana, Arial, Helvetica, sans-serif;
}
#loading{
	font-size: 10px;
}
.my
{
	color:#FF0000;
}
.talker
{
	color:#0000FF;
}
-->
</style>
</head>
<body>
<div id="container">
 
    
    <div id="contenuto">
      
    </div>
    <p>
    	<div id="loading"></div>
      <input id="req" type="text" size="55" value=""/>
      <input type="checkbox" id="apprendi" value="1" />
      <input type="button" id="invia" name="Submit" value="Invia" />
    </p>

</div>
</body>
</html>
